<?php

require_once("../config/config.php");
	
	$id = $_SESSION["id"];
	
	$db= new PDO( PDO_DSN , USER , PASSWD ) or die("Echec de connexion au serveur");
	
	$db->exec("SET NAMES 'UTF8'");
	
	$sql = "SELECT cl_nom , cl_prenom , cl_mail
		FROM clients
		WHERE cl_id = :idClient ;";
	
	$rq=$db->prepare($sql);
	
	$rq->bindParam(":idClient",$id);
	
	$rq->execute();
	
	$rq->bindColumn("cl_nom",$nom);
	$rq->bindColumn("cl_prenom",$prenom);
	$rq->bindColumn("cl_mail",$mail);
	
	foreach($rq as $ligne) {
	}
	$content = "<div id='infoPersoGauche'><img src='../images/unknown.png' />
			<p>Nom : $nom</p>
			<p>Prénom : $prenom</p>
			<p>Mail : $mail</p>
			<form action=''>
			<input type='submit' name='change' value='Changer de mot de passe' />
			</form>
			</div>";

	echo $content ;
		

?>
